package com.fulihui.weixinclient.request;

import com.alibaba.fastjson.JSON;
import com.fulihui.weixinclient.http.HttpMethodEnum;
import com.fulihui.weixinclient.result.WeixinJsonResult;

/**
 * 添加微信菜单接口请求对象
 * Created by Willard on 2015/9/16.
 */
public class MenuCreateWeixinRequest extends FuncWeixinRequest<WeixinJsonResult> {
    private static final long serialVersionUID = 1808588196054672574L;

    private String            body;

    @Override
    public String service() {
        return "https://api.weixin.qq.com/cgi-bin/menu/create";
    }

    @Override
    public String urlEndStr() {
        return null;
    }

    @Override
    public WeixinJsonResult parseResult(String respStr) {
        WeixinJsonResult result = JSON.parseObject(respStr, WeixinJsonResult.class);
        checkResult(result);
        return result;
    }

    @Override
    public HttpMethodEnum httpMethod() {
        return HttpMethodEnum.SSL_POST;
    }

    @Override
    public String requestData() {
        return body;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }
}
